using ExpressesClass.BestApi.Base;
using ExpressesClass.BestApi.kdCreateOrderNotifyRsp;
using ExpressesClass.BestApi.Utils;
using System;

namespace ExpressesClass.BestApi.kdCreateOrderNotifyReq
{
	public class KdCreateOrderNotifyReq : BaseRequest
    {
		public string customerName { get; set; }
		public string customerId { get; set; }
		public string txLogisticID { get; set; }
		public string tradeNo { get; set; }
		public string mailNo { get; set; }
		public string orderType { get; set; }
		public string serviceType { get; set; }
		public string orderFlag { get; set; }
		public string sendStartTime { get; set; }
		public string sendEndTime { get; set; }
		public string recSite { get; set; }
		public double? goodsValue { get; set; }
		public double? itemsValue { get; set; }
		public double? insuranceValue { get; set; }
		public int? special { get; set; }
		public string remark { get; set; }
		public double? totalServiceFee { get; set; }
		public double? buyServiceFee { get; set; }
		public double? codSplitFee { get; set; }
		public Sender sender { get; set; }
		public Receiver receiver { get; set; }
		public Items items { get; set; }
		public string cusSendCode { get; set; }
		public double? itemWeight { get; set; }
       
		public override String obtainServiceType()
        {
            return "KD_CREATE_ORDER_NOTIFY";

        }

		public override BaseResponse makeResponse(string rsp, string format)
        {
           if ("XML".Equals(format, StringComparison.InvariantCultureIgnoreCase)) {
               return XmlUtils.xmlToObj(rsp,typeof(KdCreateOrderNotifyRsp)) as KdCreateOrderNotifyRsp;
           }
           return JsonParser.jsonToObj<KdCreateOrderNotifyRsp>(rsp);
        }


    }
}